<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/10/11 0011
 * Time: 上午 9:03
 */$line= 1;
while($line<5){
    $empty_pos=$star_pos=1;
    $empoty=5-$line;
    $star=2*$line-1;
    while($empoty_pos<=$empoty){
        echo'&nbsp';
        ++$empty_pos;
    }
    while($star_pos<=$star){
        echo'*';
        ++$star_pos;
    }
    echo'<br>';
    ++$line;
}